-
Notifications
You must be signed in to change notification settings - Fork 33
Add enable_android_sdk_checks option for Android emulator testing #215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Could we get some more eyes on this, perhaps by @jakepetroules and/or @justice-adams-apple? I'd like to start testing out various swiftlang projects with Android testing enabled, which will be important for ensuring the quality and stability of the 6.3 release. |
| android-sdk-build: | ||
| name: Swift SDK for Android Build (${{ matrix.swift_version }} - ${{ matrix.os_version }} - NDK ${{ matrix.ndk_version }}) | ||
| name: Swift SDK for Android Build (${{ matrix.swift_version }} - NDK ${{ matrix.ndk_version }}) | ||
| runs-on: ubuntu-latest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we lose some level of coverage here by removing all the SDK builds from docker? Previously we were testing the static SDK builds on a number of different OS's using docker (whatever the repo owner specified with linux_os_versions, is there any concern with the loss of coverage for the Swift SDK for Android ?
Admittedly I'm not Sure how much value that created, maybe that coverage was minimal?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like it was overkill, since we are cross-compiling to a different target. It is theoretically possible that some host toolchain issue might get caught by this, but I figured that all the other host toolchains matrix variants that are running in Docker (including the cross-compilation provided by the static SDK) would catch these build issues.
Besides, we can't run the Android emulator tests in Docker due to nested virtualization, so we'd only be able to see if the package builds, not if it passes the tests.
…at the last triple in the list is used for emulator testing
justice-adams-apple
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we'll definitely want to squash this I assume 👍
For sure! If you can Squash & Merge, please go ahead. Otherwise, I can rebase and squash in the branch. |
shahmishal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @marcprux and everyone who provided feedback!
The Android CI added in #172 will build against the Swift SDK for Android using the
scripts/install-and-build-with-sdk.shsupport for building with cross-compilation SDKs, but it does't actually test the package. This PR adds ascripts/android/android-emulator-tests.shscript that will install and configure an Android emulator and then transfer the test cases over to it and run the tests on the emulator.Notes:
enable_android_sdk_buildinput toworkflows/swift_package_test.yml, we now have anenable_android_sdk_checksboolean which will additionally run a package's test cases.aarch64-unknown-linux-android28andx86_64-unknown-linux-android28inworkflows/swift_package_test.yml), we will still build against each of these archs, but only test againstx86_64.#filePathreferences to test data (e.g., in swift-crypto), which will not work when the tests are run in an emulator with a separate filesystem. I expect that some of these packages will need to be updated if we are to enableenable_android_sdk_checksfor them.A successful run can be seen at https://github.com/swift-android-sdk/github-workflows/actions/runs/20244304679/job/58120240667
Closes #179 and #83
CC: @finagolfin, @justice-adams-apple, @etcwilde, @shahmishal